-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make SelectedDeclarationProvider argument-aware #5740
Conversation
…rom argument in SelectionChangeService.
Tweaking "find all references" to locate argument refs (not just the named ones) for parameter declarations would be a nice next step. |
Sweet enhancement! 2 small comments based on the images:
|
@bclothier 1 is a good idea, I'll do that. Hadn't realized 2 is possible when there are no named arguments, this would work too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work! Only one little nitpick about magical literals.
Rubberduck.Core/UI/Command/MenuItems/CommandBars/IContextFormatter.cs
Outdated
Show resolved
Hide resolved
… and other forbidden names; adjusted name validator accordingly.
This pull requests makes the
SelectionService
resolve the selectedParameterDeclaration
given a selection that's inside anArgumentContext
; the parameter declaration is used for the "current selection" caption when the argument is an expression that doesn't otherwise resolve to another declaration, like when an argument is a literal:Or when the argument is an expression with late-bound elements selected:
But any early-bound more specific sub-expression that resolves to a declaration remains the caption for other parameters:
Named arguments in a different order than defined, doesn't break:
Missing arguments aren't handled and behave as previously: